 {
        
     cc.Class({
            extends: cc.Component,
            properties: {
                spBg: {
                    default: null,
                    type: cc.Sprite
                },
                spTile: {
                    default: null,
                    type: cc.Sprite
                },
                seatId: 0,
                tileRes: ""
            },
            onLoad: function () {
                this._isYellow = !1, this._tileValue = 0, Global.notificationCenter.on(Global.eventName.GAME_RESET_TILE_YELLOW, this._onResetYellowTile.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.GAME_UPDATE_SELECT_TILE, this._onSelected.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_LIEDOWN_SETYELLOW, this.onSetYellow.bind(this), this);
            },
            onDestroy: function () {
                Global.notificationCenter.offAll(this);
            },
            start: function () {
            },
            update: function (e) {
                this._isInLucky || (1 == this._isYellow ? this.setYellow() : this.setWhite());
            },
            bindData: function (e) {
                this._tileValue = e;
                var t = this.tileRes + e, n = null;
                this.seatId == Global.config.SEAT_DOWN && (n = "Texture/mj_az_tiles"), this.seatId == Global.config.SEAT_UP && (n = "Texture/mj_ad_tiles"),
                this.seatId == Global.config.SEAT_LEFT && (n = "Texture/mj_al_tiles"), this.seatId == Global.config.SEAT_RIGHT && (n = "Texture/mj_ar_tiles"),
                    Global.spriteAtlas.setSpriteFrame(this.spTile, n, t);
            },
            setWhite: function () {
                this.spTile && (this.spTile.node.color = cc.color(255, 255, 255, 255)), this.spBg && (this.spBg.node.color = cc.color(255, 255, 255, 255));
            },
            setYellow: function () {
                this.spTile && (this.spTile.node.color = cc.color(205, 216, 75, 255)), this.spBg && (this.spBg.node.color = cc.color(205, 216, 75, 255));
            },
            setGary: function () {
                this.spTile && (this.spTile.node.color = cc.color(179, 177, 177, 255)), this.spBg && (this.spTile.node.color = cc.color(179, 177, 177, 255));
            },
            _onResetYellowTile: function () {
                this._isInLucky || (this._isYellow = !1);
            },
            _onSelected: function (e) {
                this._tileValue == e.tileValue ? this._isYellow = !0 : this._isYellow = !1;
            },
            onSetYellow: function (e) {
                var t = !1;
                if (e && e.luckyTileValueArr && e.luckyTileValueArr.length > 0) for (var n = e.luckyTileValueArr, o = 0; o < n.length; o++) if (this._tileValue == n[o]) {
                    t = !0;
                    break;
                }
                if (e && t && e.seatIdLoc == this.seatId) {
                    console.log("lucky onSetYellow Hu:", this._tileValue), this.setLuckyLook();
                    var i = cc.instantiate(this.node), a = SceneHelper.getCurScene().getChildByName("cloneLayout"),
                        r = a;
                    if (this.seatId == Global.config.SEAT_DOWN) {
                        r = r.getChildByName("clone_Node_hu_down");
                        var s = Global.utils.searchNode(SceneHelper.getCurScene(), "Node_hu_down");
                        r.setPosition(s.getPosition());
                    } else if (this.seatId == Global.config.SEAT_UP) {
                        r = r.getChildByName("clone_Node_hu_up");
                        var l = Global.utils.searchNode(SceneHelper.getCurScene(), "Node_hu_up");
                        r.setPosition(l.getPosition());
                    }
                    r && r.addChild(i), i.getComponent("HuTileController").setLuckyLook(), a.setSiblingIndex(a.parent.childrenCount);
                } else this.setGary();
            },
            setLuckyLook: function () {
                this._isInLucky = !0, this.setWhite();
                var e = this.node.getChildByName("luckSp"), t = this.node.getChildByName("luckShadow");
                e && (e.active = !0), t && (t.active = !0);
            }
        })
    }